package com.game.framework.common;

public enum BaitTypeEnum {
    NO_BAIT(0,"无鱼饵"),
    INITIAL_BAIT(1,"初级鱼饵"),
    MIDDLE_BAIT(2,"中级鱼饵"),
    HIGHT_BAIT(3,"高级鱼饵");

    private final int type;
    private final String desc;

    BaitTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }


    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }


    public static BaitTypeEnum get(Integer type) {
        switch (type) {
            case 1:
                return INITIAL_BAIT;
            case 2:
                return MIDDLE_BAIT;
            case 3:
                return HIGHT_BAIT;
            case 0:
            default:
                return NO_BAIT;
        }
    }

    public static String getDesc(Integer type) {
        switch (type) {
            case 1:
                return INITIAL_BAIT.desc;
            case 2:
                return MIDDLE_BAIT.desc;
            case 3:
                return HIGHT_BAIT.desc;
            case 0:
            default:
                return NO_BAIT.desc;
        }
    }
}
